package com.example.gaoyang.controller;

import com.example.gaoyang.annotation.NoAuth;
import com.example.gaoyang.domain.request.JointCarRequest;
import com.example.gaoyang.domain.vo.JointCarVO;
import com.example.gaoyang.request.Result;
import com.example.gaoyang.service.JointCarService;
import com.example.gaoyang.util.ResultUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/jointCar")
public class JointCarController {

    @Resource
    private JointCarService jointCarService;

    @PostMapping("/getJointCarList")
    @NoAuth
    public Result<List<JointCarVO>> getJointCarList(@RequestBody JointCarRequest jointCarRequest) {
        return ResultUtil.success(jointCarService.getJointCarList(jointCarRequest));
    }

}
